package com.rc.evcharger.service.elec;

import com.rc.evcharger.common.base.BaseService;
import com.rc.evcharger.mapper.elec.ElecPileMapper;
import com.rc.evcharger.model.elec.ElecPile;
import com.rc.evcharger.model.elec.ElecPileExample;

/**
 *
 * Created by sven on 2019/09/23.
 */
public interface ElecPileService extends BaseService<Long, ElecPile, ElecPileExample, ElecPileMapper> {
    /**
     * 根据桩的逻辑地址查询桩
     *
     * @param rtua
     * @return
     */
    ElecPile selectPileByLogicAddress(String rtua);

    ElecPile selectByPileNo(String pileNum);

    int isLoginStatus(ElecPile elecPile);

    /**
     * 将桩的枪号标为使用中
     * @param pileId
     * @param gunId
     * @param usingStatus
     */
    void updateGunUsing(Long pileId, Long gunId, Integer usingStatus);

    /**
     * 将所有使用的桩设为离线
     */
    void updatePileOffLine();

    /**
     * 根据桩群编号查询桩
     *
     * @param epNo
     * @return
     */
    ElecPile findByEpNo(String epNo);

    /**
     * 更新使用状态
     *
     * @param pileId
     * @param normalStatus
     */
    void updateGunNormal(Long pileId, String gunNum, Integer normalStatus);

    /**
     * 查询各桩时间段的电价
     */
    //List<EpgPrice> findEpgPriceByType(Long pileId, String priceType);

    void updateVersion(Long pileId, String version);

    String splitYcFrameByRuta(String pileRtua);

    boolean elecpileVersionDiffer(String version);
}
